package com.ltkj.shop.controller.mobile;

import com.ltkj.common.core.web.controller.BaseController;
import com.ltkj.common.core.web.domain.AjaxResult;
import com.ltkj.common.core.web.page.TableDataInfo;
import com.ltkj.shop.domain.ShopStore;
import com.ltkj.shop.service.IShopStoreService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 文创商店Controller
 * 
 * @author xupf
 * @date 2023-08-29
 */
@Api(tags = "文创商店移动端接口")
@RestController
@RequestMapping("/mobile/store")
public class ShopStoreMobileController extends BaseController
{
    @Autowired
    private IShopStoreService shopStoreService;

    /**
     * 查询文创商店列表
     */
    @ApiOperation("查询文创商店列表")
    @GetMapping("/list")
    public TableDataInfo list(ShopStore shopStore)
    {
        startPage();
        List<ShopStore> list = shopStoreService.selectShopStoreList(shopStore);
        return getDataTable(list);
    }

    /**
     * 获取文创商店详细信息
     */
    @ApiOperation("获取文创商店详细信息")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
        return success(shopStoreService.selectShopStoreById(id));
    }

}
